package com.xuelang.pipeline.infrastructure.resource.converter;

import com.xuelang.pipeline.domain.resource.Space;
import com.xuelang.pipeline.infrastructure.resource.dataobject.SpaceDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 空间实体与空间DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface SpaceToSpaceDOConverter {

    SpaceToSpaceDOConverter INSTANCE = Mappers.getMapper(SpaceToSpaceDOConverter.class);

    /**
     * Space转化为SpaceDO
     * @param space
     * @return
     */
    SpaceDO spaceToSpaceDO(Space space);

    /**
     * SpaceDO转化为Space
     * @param spaceDO
     * @return
     */
    Space spaceDOToSpace(SpaceDO spaceDO);

}
